<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>通过后台来转换</title>
    <link href="https://cdn.bootcdn.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
</head>
<body>
<div class="container">
    <div class="form-group">
<textarea id="hanzi" rows="3">
</textarea>
    </div>
    <div class="form-group">
        <input id="magic" type="button" value="转换"/>
    </div>
    <h3 id="miracle"></h3>
</div>
<script>
    $(document).ready(function () {
        $("#magic").click(function () {
            $('#miracle').load('/transform?str=' + $('#hanzi').val());
        })
    })
</script>
</body>
</html>